<template>
  <div class="navbar">
    <div class="container width_1200_auto flex flex-a-c">
      <div class="search-box">
        <a-input-search
          class="search"
          v-model:value="searchData"
          enter-button
          size="large"
          placeholder="输入你想查找的考试"
          @search="search"
          @keyup.enter.native="search"
        />
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
import { useRouter } from "vue-router";

const emit = defineEmits(["searchExam"]);

const router = useRouter();

const searchData = ref(); // 搜索内容

function search() {
  emit("searchExam", searchData.value);
}
</script>
<style scoped lang="scss">
@import "@/assets/style/course/global";

.only-store {
  text-align: right;
  color: $theme_color;
  cursor: pointer;
}

.navbar {
  height: 73px;
  background: #fff;
  margin-bottom: 20px;
}

.container {
  position: relative;
  height: 100%;
}

.search {
  width: 778.4px;
  margin: 10px 0 5px 0;
  border-radius: 18.9px;
}

.search-box {
  margin: 0 auto;
}

</style>
